<?php

namespace App\Http\Controllers\Common;

use App\Http\Classes\Material;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class MaterialController extends Controller
{
    //
    public function getMaterial()
    {
        try
        {
            $material = new Material();
            $materials = $material->getMaterials();
            if ( $materials )
            {
                return $this->response(1, '获取成功', $materials);
            }
            else
            {
                return $this->response(0, '无匹配数据', null, $material->getMessage());
            }
        }
        catch (\Exception $exception)
        {
            return $this->exceptionResponse($exception, __FUNCTION__);
        }
    }
}
